Public Class WebServiceUtilities

    Public Shared Function Login(ByRef t As BVweb.AuthenticationToken) As Boolean
        Dim result As Boolean = False

        Try
            Dim svcMembership As New BVweb.WebServices3
            svcMembership.Url = Helpers.FullServiceUrl
            Try
                Logging.WriteLine("Using Store: " & svcMembership.Url)
                t = svcMembership.Login(My.Settings.StoreUsername, My.Settings.StorePassword)
                If t.TokenRejected = False Then
                    result = True
                End If
            Catch ex As Exception
                MsgBox("Login Error: " & ex.Message & " - " & ex.StackTrace)
                result = False
            End Try
            svcMembership.Dispose()
        Catch ex As Exception
            Throw ex
        End Try

        Return result
    End Function


End Class
